home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
cbibcode.arc
/
ATOL.C
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1991-08-05
|
327 b
|
17 lines
/* atol.c, from p.172 of Turbo C Bible */
/* Converts a string to a long integer. */
#include <stdio.h>
#include <stdlib.h>
main(int argc, char **argv)
{
long value;
if(argc < 2)
{
printf("Usage: %s <value>\n", argv[0]);
}
else
{
value = atol(argv[1]);
printf("Value entered = %ld\n", value);
}
}